const fs = require('fs');
const fileNameAndPath = __filename;
const fileName = __filename.slice(__dirname.length + 1);

class logC {
    // async insertLog(option = {}) {
    async insertLog(str) {
        await fs.appendFile("./log.txt", str, (error) => {
            if (error) return console.log("追加文件失败" + error.message);
            console.log("追加成功");
        });
    }
}

module.exports = new logC();